<%
	// TODO: move away from JSP ...
	// GET DASSOURCES
	System.out.println("findAction:" + findAction);
if ( findAction == null ) {
	findAction = "list";
}
	String paramstring = "";

	

	

	if ((keyword != null) && (!keyword.equals(""))) {
		paramstring += "&cmd=keyword&keyword=" + keyword;
	} else {
		paramstring += "&cmd="+findAction;
	}
	if ((keywordForTypes != null) && (!keywordForTypes.equals(""))) {
		paramstring += "&cmd=keywordForTypes&keywordForTypes=" + keywordForTypes;
	} else {
		paramstring += "&cmd="+findAction;
	}

	// SORTING

	String sortstring = "";
	String reversestring = "";
	String notreversestring = "";
	if (sort != null) {
		sortstring = "&sort=" + sort;
		//sort das sources!
		if (reverse != null) {
			out.println("<br>sorted reverse by " + sort + "</br>");
			notreversestring += "&reverse=true";

		} else {
			out.println("<br>sorted by " + sort + "</br>");
			reversestring += "&reverse=true";
		}

		
	}
%>

<%
	// check for the scrolling parameters.

	String posS = request.getParameter("pos");
	int pos = 0;
	try {
		pos = Integer.parseInt(posS);
	} catch (Exception e) {
	}

	int stepsize = DEFAULT_STEPSIZE;

	String stepS = request.getParameter("stepsize");
	try {
		stepsize = Integer.parseInt(stepS);
	} catch (Exception e) {
	}

	int nrServers = 100;

	if (stepsize < 1)
		stepsize = 1;

	if (stepsize > nrServers)
		stepsize = nrServers;

	if (pos < 0) {
		pos = 0;
	}

	if (pos > nrServers)
		pos = nrServers - stepsize;
%>
